Skip to content

feat(binding-mcp-openapi): pick up OpenAPI operation summary and description for generated tools#2028

Merged
jfallows merged 2 commits into
developfrom
claude/zilla-mcp-openapi-tool-summary-80enuj
Jul 6, 2026
Merged

feat(binding-mcp-openapi): pick up OpenAPI operation summary and description for generated tools#2028
jfallows merged 2 commits into
developfrom
claude/zilla-mcp-openapi-tool-summary-80enuj

Conversation

@jfallows

@jfallows jfallows commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Description

mcp_openapi previously ignored the OpenAPI operation's summary field entirely, and defaulted a tool's description to the raw operationId when no explicit options.tools[].description override was configured.

This change:

  • Parses summary and description from OpenAPI operations (OpenapiOperation / OpenapiOperationView in common-openapi).
  • Wires operation.summary into the generated mcp_http tool's summary field (the static text is used verbatim by mcp_http as the tool-call response content, ahead of a fuller dynamic/templated summary story for later).
  • Changes the tool description fallback chain to: explicit options.tools[].description override → OpenAPI operation.descriptionoperationId (previously just operationId). operationId is natural-language-poor (e.g. pulls/create), while description is written prose that's far more useful for an LLM deciding whether to invoke a tool.
  • Reorders McpHttpToolConfig fields/constructor to (name, summary, description, input, output) for readability, and updates the two call sites plus the JSON adapter's read/write order to match.
  • Updates binding-mcp-openapi.spec k3po fixtures (create.pr, create.pr.10k): these already embedded an OpenAPI summary field that was previously inert; it now becomes the literal tool-call response text, so the expected scripts are updated accordingly.

Added unit tests in McpOpenapiCompositeGeneratorTest covering: summary pass-through, description defaulting to operation.description when present, and falling back to operationId when absent.

Verified mvn clean verify (checkstyle + license + unit + IT) is green across common-openapi, binding-mcp-http, and binding-mcp-openapi, including the k3po integration tests and the spec module's peer-to-peer scripts.

Fixes # (issue)


Generated by Claude Code

claude added 2 commits July 5, 2026 23:06
…ription for generated tools

Parse `summary` and `description` from OpenAPI operations and wire them into
the generated mcp_http tool config: `summary` feeds the (currently static)
mcp_http tool summary, and tool description now falls back to the operation
description before operationId. Also reorders McpHttpToolConfig fields/ctor
args (summary before description) for readability.

Updates create.pr fixtures in binding-mcp-openapi.spec since the OpenAPI
summary field they already embedded is no longer inert.
…pr scripts

The scripts are self-documenting; the summary text is inline in the read.
@jfallows jfallows merged commit 78a0747 into develop Jul 6, 2026
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants